import { mapState, useStore } from 'vuex'
import { computed } from 'vue'
export default function (keys) {
  const StoreFns = mapState(keys)
  const mapStatetoSetup = {}
  Object.keys(StoreFns).forEach(fn => {
    mapStatetoSetup[fn] = computed(StoreFns[fn].bind({ $store: useStore() }))
  })
  return mapStatetoSetup
}
